package com.aabte.permissionframeworklearn.permission.param;

import lombok.Data;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.Max;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;

/**
 * @author Daniel
 */
@Data
public class RoleParam {

    private Long id;

    @NotBlank(message = "角色名称不能为空！")
    @Length(min = 2, max = 20, message = "角色名称长度需要在2-20个字符内！")
    private String name;

    @Min(value = 1, message = "角色类型不合法！")
    @Max(value = 2, message = "角色类型不合法！")
    private Integer type = 1;

    @Length(max = 200, message = "角色备注长度需要在200个字符内！")
    private String remake;

    @NotNull(message = "角色状态不能为空！")
    private Integer status;

}
